# Contributor: Galen Abell <galen@galenabell.com>
# Maintainer: Galen Abell <galen@galenabell.com>
pkgname=py3-remind
pkgver=0.19.1
pkgrel=0
pkgdesc="Python library to convert between Remind and iCalendar"
url="https://github.com/jspricke/python-remind"
arch="noarch"
license="GPL-3.0-only"
depends="python3 remind py3-dateutil py3-tz py3-tzlocal py3-vobject"
makedepends="py3-setuptools py3-wheel py3-gpep517"
checkdepends="py3-pytest"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/jspricke/python-remind/archive/v$pkgver.tar.gz"
builddir="$srcdir/python-remind-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	gpep517 install-wheel --destdir .testenv --prefix '' .dist/*.whl
	.testenv/bin/python3 -m pytest
}

package() {
	gpep517 install-wheel --destdir "$pkgdir" \
		.dist/*.whl
}

sha512sums="
5f56a31236972ae779d818dd4e62d3532a5660162c004e748e7a43ffcadfe946687f1b2a1b082b93a4fcd6b87fb6c2134d3467a16117f41f9b512f825cb2884e  py3-remind-0.19.1.tar.gz
"
